package com.smarthospital.dao.daoService;

import com.smarthospital.dao.mapper.ReportDao;
import com.smarthospital.entity.pojo.Report;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class ReportDaoService{

    @Resource
    private ReportDao reportDao;


    public int insertSelective(Report pojo){
        return reportDao.insertSelective(pojo);
    }

    public int insertList(List<Report> pojos){
        return reportDao.insertList(pojos);
    }

    public int update(Report pojo){
        return reportDao.update(pojo);
    }

    public List<Report> querMyReports(String userId) {
        return reportDao.querMyReports(userId);
    }

    public List<Report> selectByHospitalAndReportId(Long userId,List<Report> list) {
        return reportDao.selectByHospitalAndReportId(userId.toString(),list);
    }

    public List<Report> selectByHospitalAndUserId(String hospital, Long id) {
        return reportDao.selectByHospitalAndUserId(hospital,id.toString());
    }
}
